﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

    public class AdvertisementPositionController : AdvertisementDataContext
    {
        private static AdvertisementPositionController instance;
        public static AdvertisementPositionController Instance
        {
            get
            {
                if (instance==null)
                {
                    instance=new AdvertisementPositionController();
                }
                return instance;
            }
            set
            {
                instance=value;
            }
        }
        public List<AdvertisementPosition> GetPositionList(bool status)
        {
            AdvertisementDataContext datacontext=new AdvertisementDataContext();
            List<AdvertisementPosition> list=(from o in datacontext.AdvertisementPositions
                                              where o.flag==status
                                              select o).ToList();
            return list;
        }
    }
